package com.heima.controller;

import com.heima.common.PageResult;
import com.heima.pojo.dto.PartnerPageDTO;
import com.heima.service.PartnerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/user-service/partner")
public class PartnerController {
    @Autowired
    private PartnerService partnerService;

    @GetMapping("/search?pageIndex=1&pageSize=10")
    public PageResult page(@RequestBody PartnerPageDTO partnerPageDTO){
        return partnerService.pageQuery(partnerPageDTO);
    }

}
